#ifndef SUB_SESSION_MGR_H
#define SUB_SESSION_MGR_H
#include <net_module.h>
#include <boost/pool/object_pool.hpp>
#include <singleton.h>
class CSubsessionEventHandler;
class CSubSessionMgr :
    public utility::network::session_mgr, public CSingleton<CSubSessionMgr>
{
    friend class CSingleton<CSubSessionMgr>;
    typedef boost::object_pool<CSubsessionEventHandler> TEventHandlerPool;
public:
    // handle the event when established
    virtual void on_accept(utility::network::session *);    
    // recycle event handler
    void RecycleEventHandler(CSubsessionEventHandler *);
private:
    TEventHandlerPool m_EventHandlers;
};

#endif // endif SUB_SESSION_MGR_H

